package com.hsy.crm.web.web.basics;

import com.hsy.crm.web.domain.cm.Response;
import com.hsy.crm.web.domain.entity.ProductPrice;
import com.hsy.crm.web.service.impl.ProductPriceService;
import com.hsy.crm.web.web.BaseAction;
import com.hsy.crm.web.domain.cm.Response;
import com.hsy.crm.web.domain.entity.ProductPrice;
import com.hsy.crm.web.web.BaseAction;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/productPrice")
public class ProductPriceAction extends BaseAction {

    @Autowired
    ProductPriceService productPriceService;

    @RequestMapping("/insert")
    public String insert(ProductPrice productPrice) {
        return Response.body(productPriceService.insert(productPrice));
    }

    @RequestMapping("/update")
    public String update(ProductPrice productPrice) {
        return Response.body(productPriceService.update(productPrice));
    }

    @RequestMapping("/select")
    public String select(ProductPrice productPrice) {
        return Response.body(productPriceService.select(productPrice));
    }

    @RequestMapping("/get")
    public String get(ProductPrice productPrice) {
        return Response.body(productPriceService.selectOne(productPrice));
    }


}
